﻿namespace RBAC_Get.API.Infrastructures.Interfaces
{
    /// <summary>
    /// 基类仓储接口  where约束，可以被实例化
    /// </summary>
    /// <typeparam name="T">占位符</typeparam>
    public interface IBaseRepositoryGet<T> where T : class, new()
    {
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        IEnumerable<T> GetAll(string sql);
        /// <summary>
        /// 新增
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        int Add(string sql, object param);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        int Update(string sql, object? Data);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        int Delete(string sql, object? Data);
    }
}
